//
//  WeiTuoDetailVC.m
//  RENTVISITOR
//
//  Created by wonder on 2017/10/26.
//  Copyright © 2017年 UNN. All rights reserved.
//

#import "WeiTuoDetailVC.h"
//#import "RentVieitor.h"
#import "SelectView.h"

@interface WeiTuoDetailVC ()
//@property (nonatomic, strong)UITableView *tableView;
//@property (nonatomic, strong)NSMutableArray *dataSource;
@property(nonatomic,weak)SelectView *updataV;

//{
//    CGFloat Y;
//}
@end

@implementation WeiTuoDetailVC
//- (UITableView *)tableView
//{
//    if (!_tableView) {
//        _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 64, ScreenWidth, ScreenHeight-64) style:UITableViewStyleGrouped];
//        _tableView.delegate = self;
//        _tableView.dataSource = self;
//        _tableView.bounces  = YES;
////        _tableView.tableFooterView = [[UIView alloc] init];
////        [_tableView registerClass:[RentInforCell class] forCellReuseIdentifier:@"RentInforCell"];
//    }
//    return _tableView;
////}
//- (NSMutableArray *)dataSource
//{
//    if (!_dataSource) {
//        _dataSource = [NSMutableArray array];
//    }
//    return _dataSource;
//}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setNaviViews];
    [self setOneUI];
}
- (void)setNaviViews{
    //返回按钮
    UIButton *backBtn = [UIButton new];
    [backBtn setImage:[UIImage imageNamed:@"消息"] forState:UIControlStateNormal];
    backBtn.imageView.contentMode = UIViewContentModeCenter;
    //    [backBtn addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.naviView addSubview:backBtn];
    [backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.naviView).mas_offset(10);
        make.right.mas_equalTo(self.naviView).mas_offset(-15*ScaleWidth);
        make.width.mas_equalTo(88*ScaleWidth);
        make.height.mas_equalTo(88*ScaleHeight);
    }];
}
- (void)setOneUI{
    UIView *bgviewone = [[UIView alloc]initWithFrame:CGRectMake(0, 104, ScreenWidth,245)];
    bgviewone.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:bgviewone];
    NSArray *arr = [NSArray array];
    arr          = @[@"所在区域",@"小区名称",@"小区地址",@"房源户型",@"房源面积",@"期望租金"];
    NSArray *arrTwo = @[@"福田-香蜜湖",@"请填写小区名称",@"请填写小区地址"];
    UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(42*ScaleWidth, 170*ScaleHeight, 100, ScaleHeight*26)];
    [self.view addSubview:lable];
    lable.text = @"房源信息";
    lable.font = [UIFont systemFontOfSize:13];
    lable.textColor = [UIColor colorWithHexString:@"#666666"];
    lable.textAlignment = NSTextAlignmentLeft;
    //左边的lable
    for (int i = 0; i < 6; i ++) {
        UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(42*ScaleWidth, (40)*i, 60, 40)];
        [bgviewone addSubview:lable];
        lable.text = arr[i];
        lable.font = [UIFont systemFontOfSize:13];
        lable.textColor = [UIColor colorWithHexString:@"#666666"];
        lable.textAlignment = NSTextAlignmentLeft;
        if (i<3) {
            UITextField *filed = [[UITextField alloc]initWithFrame:CGRectMake(160*ScaleWidth, (40)*i+5, 470*ScaleWidth, 30)];
            filed.tag = i+100;
            [bgviewone addSubview:filed];
            filed.placeholder = arrTwo[i];
        }
        if (i == 3 ) {
            UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
            [button setTitle:@"  一房  " forState:UIControlStateNormal];
            button.frame     = CGRectMake(160*ScaleWidth, (40)*i, 470*ScaleWidth, 40);
            [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
            [bgviewone addSubview:button];
        }
        if (i == 4) {
            UITextField *filed = [[UITextField alloc]initWithFrame:CGRectMake(160*ScaleWidth, (40)*i+5, 200*ScaleWidth, 30)];
            filed.tag = i+100;
            filed.placeholder = @"";
            [bgviewone addSubview:filed];
            UILabel *lable = [UILabel new];
        }
    }
    //下划线
    for (int i = 0; i < 5; i++) {
        UIView *line = [[UIView alloc]initWithFrame:CGRectMake(20, 40+i*40, ScreenWidth - 40, 1)];
        line.backgroundColor = RGBA(214, 214, 214, 1);
        [bgviewone addSubview:line];
    }

    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
//{
//    
//    if (section == 0) {
//        return 6;
//    }
//    return 4;
//}
//-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
//    return 2;
//}
//- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
//    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScaleHeight*100)];
//    view.backgroundColor = [UIColor clearColor];
//    UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(15, 5, ScreenWidth, 30)];
//    lable.textAlignment = NSTextAlignmentLeft;
//    lable.textColor = [UIColor grayColor];
//    lable.font = [UIFont systemFontOfSize:14];
//    [view addSubview:lable];
//    return view;
//}
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
//{
//    return 100*ScaleHeight;
//}
//- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
//    return 100*ScaleHeight;
//}
//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
//{
////    self.model  = self.dataSource[indexPath.section];
////
////    MymessageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"fristCell" forIndexPath:indexPath];
////    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
////    [formatter setDateFormat:@"MM-dd hh:mm"];
////    NSString *dateTime = [formatter stringFromDate:[NSDate date]];
////    NSArray *arr      = @[@"system_photo@3x",self.model.title,dateTime,self.model.content];
////    cell.model = arr;
////    cell.backgroundColor = RGBA(214, 214, 214, 1);
////    cell.selectionStyle = UITableViewCellSelectionStyleNone;
////    //    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
////
////
//    return cell;
//}
//- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
//{
//    MymessageSystemVC *temVC = [[MymessageSystemVC alloc]init];
//    temVC.model              = _dataSource[indexPath.section];
//    temVC.titleStr           = @"System information";
//    [self presentViewController:temVC animated:YES completion:nil];
//
//}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
